package org.example.rmi;

import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;

public class RmiServerNative {
    public static void main(String[] args) throws Exception {
        Registry registry = LocateRegistry.createRegistry(8848, new MyRMIClientSocketFactory(), RmiServer.getRmiServerSocketFactory());
        HelloImpl hello = new HelloImpl();
        UnicastRemoteObject.exportObject(hello, 2077);
        registry.bind("hello", hello);

    }
}
